Ported authtools to new system