Fixed some bugs in registration

1) Validate password
2) TestClient Code