#264, #111 Fixed relating to authentication and password hashing

Resolves #264 
Resolves #111