added password hash and register