Add a timeout system to the server such that it kicks players after a certain time of inactivity
It would prevent avatars staying in game if the client didn't disconnect properly. It should send few "are you alive" ping packets first. I suggest timeout time 10s and sending 3 ping packets to client every 500ms later (if one succeeds don't send more).