uses keyring when available. compatible with python 2 and 3.