Modified code to save session password in SHA-1 hash.