added email and username validation