Bunch of fixes for LDAP, SLIM, and general workingness