Base64 and openid compatibility tweaks.

* encodestring and decodestring are outdated, so swap them for
  b64encode and b64decode.
* python-openid and python3-openid have a different name for
  [get]ExpiresIn, so we need to do some hacking to ensure
  compatibility.