Made it redirect to the login page automaticall