I'm guessing I need to somehow compare the fragment depth of the shadow map with the fragment depth of the normal render and if the fragment depth of the render is <= the fragment depth of the shadow then I don't apply the shadow.
If you already use the shadow sampler (e.g. sampler2DShadow) , then the sampler already do comparision. The problem you encounters is quite common (self shadowing/shadow acne), besides other shadowmapping approaches, the most common trick is to use a bias. Your tutorial already handles these effects, therefor try to play around with given bias values.