Fixed auth tokens and added tests