adding server run thread, client enter/leave events