Added password and email validation. More unit tests.