mergy from emax

Merge branch 'openid' into oe
Store references to all connections made in a token
Change erroneous logging.error call to logging.debug
Run DELETE FROM queries correctly (this was missing since refactor)
merging in new openid

Merge branch 'emax' into oe
patches

Merge branch 'openid' into oe