Added the set_token method

Hi. I have a authentication scheme where a new token is generated on each call. I need this set_token method to make my code work nicely. Please include it in the next build.