Update StackAuth significantly for v2.0.
Fix remaining failures and add a couple of StackAuth test cases.