Show that $z^2$ is a fourth power mod $q$ if and only if $\left(\frac{z}{q}\right) = 1$, given that $q \equiv 1 \pmod{4}$.
Here $\left(\frac{z}{q}\right)$ is the Legendre symbol whose value of 1 means that $z$ is a square modulo $q$. In the text that I'm reading they use this to conclude that $z^2$ is a fourth power mod $r$. There is some context regarding $z$ but I don't think it matters for this question.
In this text for prime $q$, $q \equiv 1 \pmod{8}$ but my professor said that using $q \equiv 1 \pmod 4$ is enough to proof this question.
From right to left I used that as $z^2$ is a fourth power mod $q$, there exists a $k$ s.t. $$k^4 \equiv z^2 \pmod{q}\\ k^4 - z^2 \equiv 0 \pmod{q}\\ (k^2 - z)(k^2 + z) \equiv 0\pmod q\\ k^2 \equiv \pm z \pmod{q}$$ Now if $k^2 \equiv z \pmod q$ we are already done for one direction, but if $k^2 \equiv -z \pmod{q}$ we can use that from quadratic reciprocity it follows that because $q \equiv 1 \pmod 4$, we have that $\left(\frac{-1}{q}\right) = 1$ so there exists an $l$ s.t. $l^2 \equiv -1 \pmod q$ and thus $$k^2l^2\equiv -1(-z) \pmod q\\ (kl)^2 \equiv z \pmod q$$ Which proves that $\left(\frac{z}{q}\right) = 1$.
For the other direction assume $\left(\frac{z}{q}\right) = 1$ $$z^{(q-1)/2} \equiv 1 \pmod q\\ \sqrt{z^{(q-1)/2}} \equiv \pm 1 \pmod q\\ z^{(q-1)/4} \equiv \pm 1 \pmod q$$ Which is where I struggle with figuring out how to use that $q \equiv 1\pmod 4$. I hope someone can help me with this and also don't hesitate to point out some mistakes.
Recall that the multiplicative group $\mathbb{F}_q^\times$ is cyclic of order $q-1$.
This means that if $q\equiv1\bmod 4$ the group of $4$th powers consists of $(q-1)/4$ elements and $z^2$ is a $4$-th power if and and only if $z$ is a square. Indeed there are $(q-1)/2$ squares which give the same $4$th power in pairs. E.g. if $q=5$ the non-zero squares are $1$ and $4$ and $1$ is the only $4$-th power.
On the other hand if $q\equiv3\bmod 4$ there's no subgroup of index $4$ in $\mathbb{F}_q^\times$, so all squares are also $4$-th powers. In other words, since the subgroup $S$ of squares is of odd order (it has $(q-1)/2$ elements) the homomorphism $$ S\longrightarrow S\qquad x\mapsto x^2 $$ must have trivial kernel and is an isomorphism. E.g. if $q=7$ the squares are $1$, $2$ and $4$ and $$ 2=3^2=2^4 $$ so that $2$ is a $4$-th power but $3$ is not a square.