adding check for api auth init