Fixing broken getDelegationToken test.
Fixing loginWithPopup and documenting callback usage.