Added email facility and extra validation on passwords for registering.