add function "valid_password" to User class
and change password type to String