implementing the new auth system in Thimble
Merge pull request #368 from Pomax/newauth

Newauth