Updated User model to hash passwords.