moved private keys to sessionStorage, changed sha1 to sha256 and inserted sent messages into the database