Merge pull request #4 from m1ch1/master

Refactor command serialization.
Add a command to deactivate sessions.