flash alerts and email validation added