added username and email validation