Well it's part of this members only area I am creating. At the top of pages that are open to members only, I use a function called check_access() that I made that checks if the member is logged in.
So if you aren't logged in and say you try to access search.php directly, it would redirect you to login.php to login. After you login, I'd like it so that the user be sent back to search.php,