Isomorphism of representation induced by a morphism of groups 
Let $G_1$,$G_2$ be groups. The question is to prove that if $$u: G_1 \rightarrow G_2$$ induces an isomorphism 
  $$\overline{u}: \operatorname{Hom}(G_2,Gl(M)) \rightarrow \operatorname{Hom}(G_1,Gl(M))$$ for all $M$ module over  $\mathbb{Z}$, then $u$ is an isomorphism.

I proved that is true for $G_1$, $G_2$ abelian, but I'm in trouble proving it is true in general.
Thanks.
 A: First, we prove that $u$ is injective.  Let $M$ be the free abelian group with basis indexed by $G_1$.  Then there is an injective morphism $G_1\to Gl(M)$ given by the action of $G_1$ on $M$ by permutation of its basis elements.  But if $u$ is not injective, then no element in the image of $\bar u$ is injective.  Thus $u$ has to be injective, otherwise $\bar u$ would not be surjective.
Next, we prove that $u$ is surjective.  Assume that it is not, and consider the set $G_2/u(G_1)$ of cosets of $u(G_1)$ in $G_2$.  Let $M$ be the free abelian group with basis indexed by $G_2/u(G_1)$.  The group $G_2$ acts on $G_2/u(G_1)$ by translation of cosets; therefore, there is a corresponding non-trivial morphism $\phi:G_2\to Gl(M)$ given by the action of $G_2$ on $M$ by permutation of its basis elements.  Note that $\bar u (\phi)$ is the trivial morphism, since the elements of $u(G_1)$ act trivially on $M$.  Thus, $\bar u$ is not injective, a contradiction.
Therefore $u$ is bijective, so it is an isomorphism of groups.
