generalized invalid token errors handling
Merge pull request #22 from olivier-squid/master

generalized invalid token errors handling