Store access token on valid authentications

Hi, 
First of all thank you for this SDK, it's very useful!
I made some tweaks that I find handy, please let me know what you think.