Updated for ldap integration