Split out the auth code into its own function
Currently the auth code is entangled in the update code.
Split it out in order to faciliate future additions.
Currently the auth code is entangled in the update code.
Split it out in order to faciliate future additions.