adding test for logoff action
adding missing methods for newstate event

* thanks to Henning Bragge for this