Adding validation of email, password and username to all apis, and adding tests.