added real code to the ldap connection, updated sql schema