Added password hashing to register functionality