## 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
"name": first_name,
                        "already_exists": already_exists,
                        "custom_error": custom_error,
                        "invalid_input": not valid_inputs,
                        "organization": organization,
                        "invite_id": invite_id,
                    },
                )
            user = User.objects.create_user(email, password, first_name=first_name, email_opt_in=email_opt_in)
            invite.use(user, prevalidated=True)
            login(request, user, backend="django.contrib.auth.backends.ModelBackend")
            posthoganalytics.capture(
                user.distinct_id, "user signed up", properties={"is_first_user": False, "first_team_user": False},
            )
            posthoganalytics.identify(
                user.distinct_id,
                {
                    "email": request.user.email if not request.user.anonymize_data else None,
                    "company_name": organization.name,
                    "organization_id": str(organization.id),
                    "is_organization_first_user": False,
                },
            )
            return redirect("/")
    return render_template(
        "signup_to_organization.html",
        request,
        context={"organization": organization, "user": user, "invite_id": invite_id},
    )
class CompanyNameForm(forms.Form):