Added token authentication to support JSON API usage