Fix email logins on front-end.

Also add user type to User model.