It is worth noting that the case of the returned value is set only by the text typed by the user. Thus if they log in using "Matthew", that's what you get. If they use "matthew", that is also what you get. So if you are using this for lookups, you should use a case-insensitive comparison. This bit me!