Fix proposal for issue #565

Normalizes the user input so that we consider the uid is always
lowercased.

Note: subject to change in a near future to allow using an other LDAP
field in distinguished name, see issue #567.