refactoring to access to resource model as an angular service.
Avoid blinking in client detail page
Manage client connection and deconnection on client detail page.