Implemented lock, logout and shutdown
Merged diff from client index