Make token + endpoints work correctly

Change-Id: I3aa15cf2c3304c057fa22204475ac287de02e8eb