I try to understand the equivalence between the problem of factoring a number and the problem of finding the period of a number. I know that there are two lemmas that assure this equivalence, namely
Lema 1 Factoring is equivalent with finding a non-trivial square-root of $1$ mod $N$.
Lema 2 Suppose that $N = pq$ and $x \in Z_N$ with $x \neq p$ and $x \neq q$. Then, with probability of $\frac{1}{2}$ we have that the order $s$ of $x$ is even and $x^{s/2}$ is a non-trivial square-root of $1$ mod $N$.
For the first Lemma the proof was very easy, but I can't figure out how to demonstrate the second one. I know that I should apply Fermat's Little Theorem and Chinese Remainder Theorem. Can you give me some hints please?