## How to reproduce

1. Log out
2. Open a specific PH link (e.g. https://<PH instance>/person/338)
3. Login

## Expected behavior

I expect it to take me to the page I was intending to go to when I was logged out and not "Insights" page.

## Actual behavior

It takes me to the https://<PH instance>/insights...

## Environment

- PostHog cloud or self-managed? self-hosted
- PostHog version/commit: 1.17.0
posthog/urls.py
user.join(organization=self.organization)
def signup_to_organization_view(request, invite_id):
    if not invite_id:
        return redirect("/")
    if not User.objects.exists():
        return redirect("/preflight")
    try:
        invite: Union[OrganizationInvite, TeamInviteSurrogate] = OrganizationInvite.objects.select_related(
            "organization"
        ).get(id=invite_id)
    except (OrganizationInvite.DoesNotExist, ValidationError):
        try:
            invite = TeamInviteSurrogate(invite_id)
        except Team.DoesNotExist:
            return redirect("/")
    organization = cast(Organization, invite.organization)
    user = request.user
    if request.method == "POST":
        if request.user.is_authenticated:
            user = cast(User, request.user)
            try:
                invite.use(user)
            except ValueError as e:
                return render_template(
                    "signup_to_organization.html",
                    request=request,
                    context={
                        "user": user,
                        "custom_error": str(e),
                        "organization": organization,