Improved authenticationWindow.