Fix logging (bug 45368) and bad error dialog for login fail