Finalize password hashing algorithm. Works for login. Works for upgrading to encrypted DB. Added check to see if database was encrypted. Fixes #13