Clean up auth code in the metaclass.