Before the discovery of neutrino mass, how did people aware electron and muon neutrinos are different?
Neutrinos are leptons, they have leptons number just like the charged leptons (electron, muon, tau).
Weak interaction conserve not only the global lepton number, but the lepton flavor numbers as well. And that is how we identify their flavors: electron neutrinos participate in reactions that involve electrons and muon neutrinos participate in reaction that involve muons.
We know that they are not the same because we have intense sources of muon neutrinos and muon anti-neutrinos (from cosmic rays and accellerator created muons and anti-muons) and we have intense sources of electron anti-neutrinos (reactors). And when we put detectors in front of these sources the two flavor behave differently; the most diagnostic interaction (and a common one) is quasi-elastic scattering in which a charged lepton out---a muon or an electron depending on the flavor of the beam. We don't have any intense sources for tau neutrinos, but they have been identified in the oscillated input to both OPERA (which was designed for that measurement) and IceCube.