Help analyzing inverse of an abs function

I am trying to find an expression for $\displaystyle f^{-1}$

$\displaystyle f(x)=ln\lvert\frac{x}{x-1}\rvert$

And then the algebra

$\displaystyle x=ln\lvert\frac{y}{y-1}\rvert$

$\displaystyle e^{x}=\lvert\frac{y}{y-1}\rvert$

First solution:

$\displaystyle e^{x}=\frac{y}{y-1}$

$\displaystyle ye^{x}-e^{x}=y$

$\displaystyle ye^{x}-y=e^{x}$

$\displaystyle y(e^{x}-1)=e^{x}$

$\displaystyle y=\frac{e^{x}}{e^{x}-1}$

Second Solution:

$\displaystyle -e^{x}=\frac{y}{y-1}$

$\displaystyle -ye^{x}+e^{x}=y$

$\displaystyle e^{x}=y+e^{x}y$

$\displaystyle e^{x}=(1+e^{x})y$

$\displaystyle y=\frac{e^x}{e^{x}+1}$

I think my calculator is telling me that the first solution I did is true for $\displaystyle y<0$ and $\displaystyle y\ge1$ and the second solution is true for all reals.

If I am understanding my calculator correctly, how do I analytically determine that the second solution is the inverse of f for all real values of x? And if this is incorrect, how do I analyze the functions I found for $\displaystyle f^{-1}$?

Thanks a lot if you can help!