Show login form on failed auth attempt.
Refactor large methods.