fixed back button in header, now checks for the state beforepageshow instead on pageshow
changed the way the app initialize first page to avoid weir flicks
Now app checks connection status before update json