move networking to different class

share the network class between views to avoid time consuming disconnect
and connect to the same server when switching views