Urine-like smell on Denim shorts/jeans after washing?

I have a pair of Denim shorts and Jeans and whenever I wash them, they emit this urine-like smell when dried. And no, I did not piss on them at all. What is the cause of this and how do I get rid of them? (My family uses cheap detergent. Would things improve if i get actually good detergent?)
13 answers 13