Solving a system of differential equations and finding periodic solutions

Consider the following system of differential equations:

$$\frac{dx}{dt}=y-1$$

$$\frac{dy}{dt}=-xy$$

So I figured that, if the initial conditions satisfy $$(x_0,y_0)\ne(0,1)$$, I can rewrite the system as

$$\frac{dy}{dx}=\frac{-xy}{y-1}$$

and for $$y\ne0$$ this can be rewritten as

$$\frac{dy}{dx}=\frac{-x}{\big(\frac{y-1}{y}\big)}$$,

thus using separation of variables yields the expression

$$y-\ln|y|-y_0+\ln|y_0|=-\frac12x^2+\frac12(x_0)^2$$.

But I don't see how this expression can give me a solution to the aforementioned system, since I believe $$y$$ cannot be written explicitley as a function of $$x$$. I guess I could express $$x$$ as a function of $$y$$, but would this give me a valid solution as well? Also, I'm not sure how to determine periodicity. I know from a plot that there are periodic solutions (for $$y_0>0$$, except in the stationary point $$(0,1)$$), but I don't understand how I can find them if I don't have an explicit solution to the system. Or how I can find them at all, actually, if I would have a function $$y$$ in terms of $$x$$. I have found this page dealing with the same problem, asking roughly the same question. However, I do not seem to understand the argument given in the answer. It's not something that has yet been discussed in my course, too. Any help would be appreciated!