added clearsessions and invalidate commands