Couple bugfixes to password encryption/decryption