Put a check in every page whether the user is logged in or not, if not then redirect to the login page.