ViewModel that manages login network requests and UI state.
Emits the latest user-visible error message, if any.
Emits whether a login attempt is currently in progress.
Emits high-level login state transitions for UI/navigation.
Resets transient login state after handling success/error in UI.
Attempts login using backend credentials API and stores auth tokens on success.