Allow login by username or email address by creating custom entity provider (UserRepository Doctrine repository object) to retrieve user from database.