Code cleanup.
remove commented out code
handle auth token as cookies