UI state is now properly cleaned up on failed login/registration