Fixed code for setting API key and auth driver.