Example of validating log in

Example of validating log in

Hello
How can I use log in form to open specific page for user, I know there is using for in success and rest of script, but need example, Thanks ?