Moved stuff around, fixed so email validation is case insensitive.