Use public API to cancel authentication

Fixes #16