ldap authentication fixes