added loading state. This ensures that the app does not progress until cordova is loaded and ready. This is nescesary since the route functionality relies on the device being ready so we can test for connection