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.  
Should include braces, like the previous if statement