added network server to client/server mode and fixed client quit code