Redirect to index page properly after registration

Before the redirect assumed the index page to be at "/". This doesn't
work with sub-directories, though, and therefore a reverse URL resolving
is used to get the correct URL.