Logout non-user principal

Closes #397