added basic server-side connection management