This should be straight forward. Where you check you're users access to a page you can incorporate a condition that checks to see if a session variable (one that is set during a successful login) is set. If it is not set then the user is automatically redirected to the login page otherwise continue through to the selected page.