Refactored Login dialog.