API token support and request timeout

Includes the API token support and a configurable request timeout.