Restructured client script to account for recent auth changes.