Various improvements to tank_auth