rework the new authtoken stuff to make it easier to debug and cleaner