I used cloth diapers for my son and found that using borax in the wash and vinegar in the rinse worked wonders.

My son is now 14 and is in the boy scouts. He brings home some really stinky clothes. Using borax and vinegar gets rid of even 14 year old boy stink and that is a very powerful stink.