added email functionality to login and admin's user activation process