Username should be stored and checked lowercase

Solves a problem where emails like `MaTTh@localdata.com` won't let a user log in, even when the content is otherwise correct.