Username case problem at login. Closes #3857.