Some fixes to new auth client code