Refactored study show page.

Now the last tab the user was on is cached. This way if the page is
reloaded, the last tab is then displayed.