What chemicals cause the smell of a septic tank?
According to the Wikipedia article Septic tanks, as septic tanks are generally anaerobic environments, pungent smells from the formation of hydrogen sulfide $\ce{H2S}$, which is sometimes referred to as 'rotten egg gas'. As you stated, ammonia $\ce{NH3}$ can be produced - also with a distinct smell.

Also, according to the Wikipedia article, fermentation could occur, producing the odourless methane and carbon dioxide as well as phosphates.

Incidentally, $\ce{H2SO4}$is the chemical formula for sulfuric acid.