only store private key in local storage if add was successful