Added login and email sending  validation