User not logged in successfully redirects to login page