Moved PrincipalContext from Ldap connection function