Implement token auth for API