added loggedIn class to main tpl container

This is a feature, not a bug fix. And it's in a pull request because it's after feature freeze. But it would be great to have it in the next release anyway.