auth and client_id detection