Using bcrypt for hashing instead. Also implemented register function.