Working registration with password hash