Ensure token header is reset before authenticating; fixes #483