Division by zero is not allowed and undefined.
Work Step by Step
There are two issues. First, when we multiplied both sides by $x$ in the second step, the solution $x=0$ is added. Second, we divided by $x-1$ is the 5th step. Since $x=1$, $x-1=0$, so this is really division by 0, which is undefined.