More fixes and LDAP login stuff.