What is the instance id in the login method of the server command service and where can we find it.

The instanceId is an identification that you make. Make sure you use the same in Logout that was used in LogIn.