Added util functions to handle hashing and comparing passwords
Named closure functions
Implemented password hashing for registering users