Added email functionality for registering/pw resets