Added code to properly handle special characters in LDAP usernames.