Partially untangle OAuth connection logic; fixes #27