Connect to server and push state to server