Back end client & server architecture & misc

Full support for closing server & client connections
Support for instant messaging