Use getAuthToken to clean up the code duplication.

Change-Id: I30b3a462303d4ae808bd078d8a6fd7e59fb294a4