Work on exit status in SSH library.
Add call to user() before firing auth.logout event. Fixes #1814