check connectivity before trying to OAuth