Some fixes in double auth.