Added a try/catch when invalidating authtokens. Fixes #891.