Added a downcase to the loginname

When users logged in with mixed cases for example LDAP authentication worked and a new user was created.