Fix password "hashing" for python3
Add unittests for password hashes