Some re-organization of the login dialog