First attempt at no connection handling

Added deviceready and online/offline event handlers - first attempt at
bad internet connection handling...