Changed registration to use email instead of username.