added basic client disconnecting. code remains pretty shitty