## 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
if user:
        return {"is_new": False}
    user_email = details["email"][0] if isinstance(details["email"], (list, tuple)) else details["email"]
    user_name = details["fullname"]
    strategy.session_set("user_name", user_name)
    strategy.session_set("backend", backend.name)
    from_invite = False
    invite_id = strategy.session_get("invite_id")
    if not invite_id:
        company_name = strategy.session_get("company_name", None)
        email_opt_in = strategy.session_get("email_opt_in", None)
        if not company_name or email_opt_in is None:
            return redirect(finish_social_signup)
        _, _, user = User.objects.bootstrap(
            company_name=company_name, first_name=user_name, email=user_email, email_opt_in=email_opt_in, password=None
        )
    else:
        from_invite = True
        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:
                processed = render_to_string("auth_error.html", {"message": "Invalid invite link!"},)