DRY up the login form