Bug fixes for login dialog.