Little changes to prepare to LDAP auth