changed logout to redirect user to the login page