Added email functionality on registration.