almost unitaries are close to a unitary element I need help to prove the following exercise: 

Let $\epsilon >0$. Show that there exists $\delta >0$ with the property: If $A$ is a unital $C^*$-algebra and $x\in A$ such that $\|x^*x-1\|<\delta,\;\|xx^*-1\|<\delta$, then there is a unitary element $u\in A$ with $\|x-u\|<\epsilon$.

To prove this, I use continuous functional calculus for the element $x^*x$ and $xx^*$ to define $u$. 
The assumptions $\|x^*x-1\|<\delta,\;\|xx^*-1\|<\delta$ imply $\sigma(x^*x), \sigma(xx^*)\subseteq [1-\delta , 1+\delta]$, where $\sigma(x^*x)$ denotes the spectrum of $x^*x$. 
If $x$ were invertible I could try something like $u=x|x|^{-1}$, where $|x|=(x^*x)^{\frac{1}{2}}$(polar decomposition), but $x$ could be non-invertible I think. But $x^*x$ is invertible if $\delta <1$, but I also have to choose a number $\delta $ which depends on $\epsilon$ .
Here I'm stuck. Which continuous function is suitable for u or how to choose $u$?
 A: If $\delta\leq1$, then $x^*x$ and $xx^*$ are invertible. In particular, we can do the polar decomposition $x=u(x^*x)^{1/2}$ and we will have $u\in A$. Also, $u$ is a unitary because $$u^*u=(x(x^*x)^{-1/2})^*(x(x^*x)^{1/2}
=(x^*x)^{-1/2}x^*x(x^*x)^{-1/2}=1,
$$
$$
uu^*=x(x^*x)^{-1/2}(x^*x)^{-1/2}x^*=x(x^*x)^{-1}x^*=1.
$$
This last equality is not obvious, but it is not hard: we have 
$$
x(x^*x)x^*=(xx^*)^2=(xx^*)^{1/2}xx^*(x^*x)^{1/2};
$$
it follows that $$xp(x^*x)x^*=(x^*x)^{1/2}p(xx^*)(x^*x)^{1/2}$$ for any polynomial $p$, and then 
$$xf(x^*x)x^*=(x^*x)^{1/2}f(xx^*)(x^*x)^{1/2}$$ for any continuous function $f$. Then $$x(x^*x)^{-1}x^*=(xx^*)^{1/2}(xx^*)^{-1}(xx^*)^{1/2}=1.$$
Now
$$
\|x-u\|=\|u(x^*x)^{1/2}-u\|=\|u(x^*x)^{1/2}-1)\|=\|(x^*x)^{1/2}-1\|.
$$
Since $\sigma(x^*x)\subset(1-\delta,1+\delta)$, we have that $$\sigma((x^*x)^{1/2})\subset((1-\delta)^{1/2},(1+\delta)^{1/2}\subset(1-\delta,1+\delta).$$ Then 
$
\|(x^*x)^{1/2}-1\|<\delta$. So we can take $$\delta=\min\{\varepsilon,1\}.$$
A: Another similar approach  (inspired by Martin Argerami)  is the following:
If $x \in A$ and $x^*x, xx^*$ are invertible, then $x$ is invertible. To see this, check that $(x^*x)^{-1}x^* = x^*(xx^*)^{-1}$. This is then the inverse of $x$. Now $x = u \sqrt{x^*x}$ for $u$ unitary since $x$ is invertible. Then the last argument of Martin applies, i.e. that $\lVert \sqrt{x^*x} - 1\rVert < \delta$.
However, this assumes that you know that in this case $u = x \sqrt{x^*x}^{-1}$ is unitary.
