Fixed disconencting bug and made telnet session clean up after themselves.