moved ldap connection out of user and into a helper module