Added logging to QueryDatabaseAuthenticationHandler.