Add support for token authentication to REST API