initializes client, requests authorization, and receives code