Fixed password validation for registration

It was possible to register with an empty password.