`useRequireAuth` redirects to `/login?redirect=${encodeURIComponent(location.pathname)}` but doesn't preserve `location.search` or `location.hash`. Query parameters are lost after login redirect.
Fix: Use `location.pathname + location.search` in the redirect URL.
`useRequireAuth` redirects to `/login?redirect=${encodeURIComponent(location.pathname)}` but doesn't preserve `location.search` or `location.hash`. Query parameters are lost after login redirect.
Fix: Use `location.pathname + location.search` in the redirect URL.