Fixed the redirection after logging in