email validation and success and failure messages