add semicolon
Add missing selftest 'var'
Call logout in selftests that log in.

This avoids wracking up huge numbers of login tokens for the test
user. It would be nice to have these automatically cleaned up, but this
will do for now.
Make final logout unconditional for logs-mongo tests