cleaned up console prints
added /close and disconnect handling
added a "connected" attribute to server