Real Line Bundle Corresponding to a Double Cover I am studying spin structures on $SO(n)$-bundles using some lecture notes. Right after defining the twist of a spin structure $(P,\psi,\rho)$ on $Q\xrightarrow{} X$ by a double cover $\pi:R\xrightarrow{} X$, the notes say that

Double covers correspond to $H^1(X;\mathbb{Z}/2\mathbb{Z})$ by considering the first Stiefel-Whitney class of the corresponding real line bundle.

I am familiar with characteristic classes, which I studied using Milnor and Stasheff's book. But I don't see how double covers correspond to real line bundles. I am not sure how relevant the spin structure is here, so I omit further details about it for now. If you think it will help, please let me know and I can give more context.
 A: Given a real line bundle $L \to X$, for any choice of bundle metric $g$ on $L$, the sphere bundle $S(L) \to X$ is a double cover of $X$. Equivalently, we obtain the double cover as the oriented orthonormal frame bundle of $L$ with respect to $g$.
Conversely, if $X' \to X$ is a double cover, then we can view it as a principal $\mathbb{Z}_2$-bundle (the $\mathbb{Z}_2$-action is generated by the non-trivial deck transformation of the cover $X' \to X$). Then we can form a real line bundle via the associated bundle construction with respect to the natural representation $\mathbb{Z}_2 \to GL(1, \mathbb{R}^*)$. The corresponding line bundle will have oriented orthonormal frame bundle $X' \to X$.
These two constructions are inverses of one another. So there is a bijective correspondence
$$\{\text{real line bundles}\} \xrightarrow{\text{oriented orthonormal frame bundle}}\{\text{double covers}\}$$
with inverse
$$\{\text{real line bundles}\} \xleftarrow{\text{associated bundle construction}}\{\text{double covers}\}.$$
