If you do this the proper way - using Membership - then all of that is automatic and happens behind the scenes. If the user tries to open a page without logging in, he is auto redirected to the login page, then back where he wanted to g when he logs in successfully.
It's easy to do:
MSDN Introduction to Membership[
^] will walk you though the whole process.