Fixed redirection when logging in