Fixes the display of tabs on the user show page and adds tests.

Fixes #441.

Failing test will be fixed in #665