Fix authentication

Fixes #4