Made token caching possible.

Made get_token public, created set_token, made token a class variable, all so tokens can be cached between calls and don't need to be requested on every request, saves a HTTP call.