Add function to hash password in User.php