Add single sign on

Fixes #7.