## 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
from typing import Any, Callable, Optional, Union, cast
from urllib.parse import urlparse
import posthoganalytics
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import authenticate, decorators, login
from django.contrib.auth import views as auth_views
from django.core.exceptions import ValidationError
from django.http import HttpResponse
from django.shortcuts import redirect, render
from django.template.loader import render_to_string
from django.urls import include, path, re_path, reverse
from django.views.decorators.csrf import csrf_exempt, csrf_protect
from django.views.generic.base import TemplateView
from loginas.utils import is_impersonated_session, restore_original_login
from sentry_sdk import capture_exception
from social_core.pipeline.partial import partial
from social_django.strategy import DjangoStrategy
from posthog.api import (
    api_not_found,
    capture,
    dashboard,
    decide,
    organization,
    projects_router,
    router,