testing internet connection and cordova