As a matter of fact, it is impossible to find a continuous $f$ such that $(f(z))^2=z$ for all $z$. In fact, it is even impossible for $f(z)$ to be defined for all $z$ with $|z|=1$. To prove this by contradiction, we can assume that $f(1)=1$ (since we could always replace $f$ by $-f$). Then we claim that for all $\theta$ with $0\leq\theta <2\pi$ we have
$$f(\cos{\theta}+i\sin{\theta})=\cos{\frac{\theta}{2}}+i\sin{\frac{\theta}{2}}\tag{*}$$
The argument for this is left to you (it is a standard type of least upper bound argument). But (*) implies that
$$\lim\limits_{\theta\to 2\pi} f(\cos{\theta}+i\sin{\theta}) = \cos{\pi}+i\sin{\pi}$$
$$=-1$$
$$\neq f(1)$$
even though $\cos{\theta}+i\sin{\theta} \to 1$ as $\theta\to 2\pi$. Thus we have our contradiction.
Let $g(\theta):=\cos\frac{\theta}{2}+i\sin\frac{\theta}{2}$.
Let $h(\theta):=-\cos\frac{\theta}{2}-i\sin\frac{\theta}{2}$.
$f(\cos\theta+i\sin\theta)=g(\theta)$ or $f(\cos\theta+i\sin\theta)=h(\theta)$ for all $\theta\in [0,2\pi)$.
How to prove $f(\cos\theta+i\sin\theta)=g(\theta)$ for all $\theta\in [0,2\pi)$?
My intuition:
By the author's assumption, $f(\cos 0+i\sin 0)=f(1)=1=\cos\frac{0}{2}+i\sin\frac{0}{2}=g(0)$.
Because $f$ is continuous, it is impossible $f(\cos\theta_1+i\sin\theta_1)=g(\theta_1)$ and $f(\cos\left(\theta_1+\Delta t\right)+i\sin\left(\theta_1+\Delta t\right))=h(\theta_1+\Delta t)$ for $\theta_1\in [0,2\pi)$ when $\Delta t$ is very small. ($f(\cos\theta+i\sin\theta)$ cannot jump. Please see the following figure.)
But I cannot prove this obvious fact.
Please give me a hint.