A customer noted that the login by email was case-sensitive, which differs to the handling of the loginname. This PR changes the email check to be case-insensitive (which it was already in same parts) and improve the search for this as well.