Modularized web and added reconnection to realtime service if connection is lost