Pretty straightforward: you send an event for which variation your user saw and another when they login, attaching the login method to the attributes.
You can use Mixpanel or Heap, which have mechanisms for mapping the non-logged-in user to your verified user on login, though you might need a bit of custom code to do it.