Cleaning up auth code.