Added support for direct authentication with API token.