Improve error logging when LDAP authentication fails.