Fix login logic so that multiple commands are not re-executed on
successful login after failed login attempts.
Document the login failure logic.