whitespace gardening
Avoid two events firing for login (form submission and button click)
Check login details before persisting.

Also, warn user if login failed.