move connectivitySwitchController code to onlineController and adapting index.html, app.js