added password hashing mongoose middleware