can now connect to server
added necessary server code