Add check for not accessing API