added functionality which checks whether the app is connected and changes the page accordingly
added unit tests for the connection related to #10