Introduce LoggedInTestMixin

There's a lot of copy-and-pasted code we can get rid of in our tests
now.
Merge pull request #102 from nikolas/logged-in-test-mixin

Introduce LoggedInTestMixin