Let $S^1\subseteq\mathbb{C}$ be the unit circle and let $U\subseteq S^1$ be open. How to show that there exist a continuous function $$\theta:U\to\mathbb{R}$$ such that $$e^{i\theta(z)}=z$$ for all $z\in U$ if and only if $U\neq S^1$?
I have been able to show the $\Rightarrow$ direction but not the other one.
$(\Rightarrow)$ If such a continuous $\theta:S^1\to\mathbb{R}$ exist, then it is injective and so $\theta(S^1)$ is a subset of $\mathbb{R}$ that is homeomorphic to $S^1$. Now, $S^1$ is compact and connected so $\theta(S^1)$ is a closed interval $[a,b]$. But removing a point from $[a,b]$ gives two connected components, while removing a point from $S^1$ still gives a connected space. Hence, $[a,b]\not\cong S^1$, so $\theta$ doesn't exist.
How would you show the $\Leftarrow$ direction?
Edit: This is an exercise in topology with no assumed prior knowledge of complex analysis. Note that we only need to show continuity of $\theta$ (not analyticity). The question is phrased in terms of complex numbers for simplicity of notation, but it is to be interpreted in terms of subspace of $\mathbb{R}^2$.
Let $\theta (z)=\Im (\log z)$ where $\log z$ is the branch for which $0<\arg z<2\pi$. This should work unless I'm missing something.