THEOREM 1: With prime $p \equiv 1 \pmod 4,$ there is always a solution to $$ x^2 - p y^2 = -1 $$ in integers. The proof is from Mordell, Diophantine Equations, pages 55-56.
PROOF: Take the smallest integer pair $T>1,U >0$ such that $$ T^2 - p U^2 = 1. $$
We know that $T$ is odd and $U$ is even. So, we have the integer equation
$$ \left( \frac{T+1}{2} \right) \left( \frac{T-1}{2} \right) = p \left( \frac{U}{2} \right)^2. $$
We have $$ \gcd \left( \left( \frac{T+1}{2} \right), \left( \frac{T-1}{2} \right) \right) = 1. $$
Indeed,
$$ \left( \frac{T+1}{2} \right) - \left( \frac{T-1}{2} \right) = 1. $$
There are now two cases, by unique factorization in integers:
$$ \mbox{(A):} \; \; \; \left( \frac{T+1}{2} \right) = p a^2, \; \; \left( \frac{T-1}{2} \right) = b^2 $$
$$ \mbox{(B):} \; \; \; \left( \frac{T+1}{2} \right) = a^2, \; \; \left( \frac{T-1}{2} \right) = p b^2 $$
Now, in case (B), we find that $(a,b)$ are smaller than $(T,U),$ but $T \geq 3, a > 1,$ and $a^2 - p b^2 = 1.$ This is a contradiction, as our hypothesis is that $(T,U)$ is minimal.
As a result, case (A) holds, with evident $$p a^2 - b^2 = \left( \frac{T+1}{2} \right) - \left( \frac{T-1}{2} \right) = 1, $$
so
$$ b^2 - p a^2 = -1. $$
$$ $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
THEOREM 2: With primes $p \neq q,$ with $p \equiv q \equiv 1 \pmod 4$ and Legendre $(p|q)=(q|p) = -1,$ there is always a solution to $$ x^2 - pq y^2 = -1 $$ in integers. The proof is from Mordell, Diophantine Equations, pages 55-56.
PROOF: Take the smallest integer pair $T>1,U >0$ such that $$ T^2 - pq U^2 = 1. $$
We know that $T$ is odd and $U$ is even. So, we have the integer equation
$$ \left( \frac{T+1}{2} \right) \left( \frac{T-1}{2} \right) = pq \left( \frac{U}{2} \right)^2. $$
We have $$ \gcd \left( \left( \frac{T+1}{2} \right), \left( \frac{T-1}{2} \right) \right) = 1. $$
There are now four cases, by unique factorization in integers:
$$ \mbox{(1):} \; \; \; \left( \frac{T+1}{2} \right) = a^2, \; \; \left( \frac{T-1}{2} \right) = pq b^2 $$
$$ \mbox{(2):} \; \; \; \left( \frac{T+1}{2} \right) = p a^2, \; \; \left( \frac{T-1}{2} \right) = q b^2 $$
$$ \mbox{(3):} \; \; \; \left( \frac{T+1}{2} \right) = q a^2, \; \; \left( \frac{T-1}{2} \right) = p b^2 $$
$$ \mbox{(4):} \; \; \; \left( \frac{T+1}{2} \right) = pq a^2, \; \; \left( \frac{T-1}{2} \right) = b^2 $$
Now, in case (1), we find that $(a,b)$ are smaller than $(T,U),$ but $T \geq 3, a > 1,$ and $a^2 - pq b^2 = 1.$ This is a contradiction, as our hypothesis is that $(T,U)$ is minimal.
In case $(2),$ we have
$$ p a^2 - q b^2 = 1. $$
$$ p a^2 \equiv 1 \pmod q, $$ so $a$ is nonzero mod $q,$ then
$$ p \equiv \left( \frac{1}{a} \right)^2 \pmod q. $$
This contradicts the hypothesis $(p|q) = -1.$
In case $(3),$ we have
$$ q a^2 - p b^2 = 1. $$
$$ q a^2 \equiv 1 \pmod p, $$ so $a$ is nonzero mod $p,$ then
$$ q \equiv \left( \frac{1}{a} \right)^2 \pmod p. $$
This contradicts the hypothesis $(q|p) = -1.$
As a result, case (4) holds, with evident $$pq a^2 - b^2 = \left( \frac{T+1}{2} \right) - \left( \frac{T-1}{2} \right) = 1, $$
so
$$ b^2 - pq a^2 = -1. $$
$$ $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
The viewpoint of real quadratic fields an norms of fundamental units is more concerned with $x^2 + xy - k y^2,$ where $4k+1 = pq$ in the second theorem. However, we showed above that the existence of a solution to $u^2 - (4k+1)v^2 = -1$ gives an immediate construction for a solution to $x^2 + xy - k y^2=-1,$ namely $x=u-v, y=2v.$
David Speyer reminded me of something Kap wrote out for me, years and years ago. From David's comments, I now understand what Kap was trying to show me. If $x^2 + x y - 2 k y^2 = -1,$ then $(2x+y)^2 - (8k+1)y^2 = -4. $ This is impossible $\pmod 8$ unless $y$ is even, in which case $(x + \frac{y}{2})^2 - (8k+1) \left( \frac{y}{2}\right)^2 = -1.$
There is more to it when we have $x^2 + x y - k y^2 = -1$ with odd $k.$ I wrote Kap's note in Buell, page 31. Take
$$ u = \frac{ 2 x^3 +3 x^2 y + (6k+3)x y^2 + (3k+1)y^3}{2}, $$
$$ v = \frac{3 x^2 y + 3 x y^2 + (k+1)y^3}{2}. $$
$$ u^2 - (4k+1) v^2 = -1, $$ since
$$ u^2 - (4k+1) v^2 = \left( x^2 + x y - k y^2 \right)^3. $$
...