fixed outstanding errors with invitation and logout

Fixes #7 
Fixes #8