Added code to redirect all users who are not logged in to the login page