update gui and connect to server