Fix if auth is enabled

Replaced in_array with array_key_exists
Merge pull request #1 from Ceda/fix-if_auth_is_enabled

Fix if auth is enabled