WIP: Authenticate a REST call using a token.

#42 

This is based on #41