The diarrhea is from the Epsom Salts . Epsom Salts can be used to relieve constipation.
Its awful having to run to the loo all the time though! I've noticed too, that when you drink more water, it seems to react with the Epsom Salts and cause another toilet visit.
Its doing what its supposed to i.e. relaxing inner body muscles to allow stones out, and causing diarrhea to make sure they come out. Like another poster said, make sure to replace the lost body salts/electrolytes and fluids.