moved ldap initialization