Saving auth params to cookie is now partly working. Saving as a checkpoint.