Init server connection and data refreshing struct.