I built a little login script for my site which checks to see if you're logged in at the top of restricted pages (with php) and if you're not logged in it redirects you to a login page. I want to keep track of the original link the user was trying to get to so after they login I can forward them to the page they were originally trying to reach. I'm not sure how to do this and would appreciate any insight.