Added more test code, moved password validation to the model instead of the controller