Refactor authentication types to remove code duplication

The code to extract the redirect token is duplicated in several places.
Move the code into LoginUrlToken.

Change-Id: I8b8917f76d6fd0126f78fbb040594d0bb74aa628
5 files changed