Galois representations attached to elliptic curves with complex multiplication