Make a case-insensitive lookup on email and username.

PostgreSQL comparisons are case-sensitive while other DB's are not.
Merge pull request #957 from jeffgabhart/master

Make a case-insensitive lookup on email and username.