Adding LDAP support. Fixed empty user email and password handling on login.