Fixed the login flow on failure