Question about maps to $K(G,1)$ I have an unfortunately basic confusion about two results in Hatcher's Algebraic Topology.
Let $G$ be an abelian group.
Theorem 4.57 specialized to $n=1$ says that there is a bijection 
$$\langle X, K(G,1)\rangle \rightarrow H^1(X;G),$$
where the first object is the set of homotopy classes of basepoint-preserving maps from $X$ to $K(G,1)$.
Proposition 1B.9 says that the set of homotopy classes of basepoint-preserving maps from a nice space $X$ to a $K(G,1)$ is in bijection with $\operatorname {Hom}(\pi_1(X), G)$.
It seems that $\operatorname {Hom}(\pi_1(X), G)$ and $H^1(X;G)$ are different in general, so I'm misunderstanding (at least) one of these statements. What is my error?
Edit: We have $H^1(X;G)=\operatorname{Hom}(H_1(X),G)$, and if $G$ is abelian, any homomorphism from $\pi_1(X)$ to $G$ will have to factor through its abelianization $H_1$. So these objects are actually the same, right"
 A: Your edit is correct. For abelian $G$, $H^1(X;G) = \text{Hom}(H_1(X);G) = \text{Hom}(\pi_1(X);G)$ because any map to an abelian group factors through the abelianization. This is frequently a good way of thinking about $H^1$. 
(For instance, if you care about characteristic classes: every real vector bundle $E$ over $M$ determines a cohomology class $w_1(E) \in H^1(M;\Bbb Z/2) = \text{Hom}(\pi_1(M);\Bbb Z/2)$, determined by $w_1(E)(\gamma) = 1$ if $E$ is orientable over $\gamma$ and $-1$ otherwise. A non-trivial element of $\text{Hom}(\pi_1(M);\Bbb Z/2)$ is the same as an index 2 normal subgroup of $\pi_1(M)$, and hence is the same as a double cover of $M$. What's the double cover corresponding to $w_1(E)$? Well, if $E$ is $d$-dimensional, $\Lambda^d E$ is a 1-dimensional vector bundle over $M$, and the projection of the unit sphere bundle is the desired double cover! In the case $E=TM$, this is the orientation double cover!! OK, this was mostly irrelevant to your question, but I think it's a cute story.)
