added user registration and email transmission