Added a function to retrieve stored token

Retrieves the stored token and some experiments with adding a global
transformRequest for handling tokens in the headers