Redirect a logged-in user to URL.

This just makes it nicer so logged-in users don't see the login- or register-page.
But it's just for those two views. The functions to change the password and so on are still working.
Merge pull request #469 from Dominic28/patch-2

Redirect a logged-in user to URL.