Username case problem at login. Closes #3857.
Merge remote-tracking branch 'ivan-github/bug/3857_username-case-problem' into develop