No matter what your religion teaches if its teaching makes you treat other people badly then you need to stop it.
I agree in principle but these days the way words are often used I'd want to clarify just what "treat other people badly" actually means.
The antics of the Westboro Baptist "Church" aren't something I'd dispute count as "treating people badly". I don't see how denying communion to someone who lives a sinful lifestyle and has no intention of repenting is treating them badly.
I think the simple reality is that it's just another case where balance is needed. If we stray one way we're effectively telling people to sort themselves out before we'll let them into our church (which is kind of like a spiritual version of the way it's hard to get a job with no experience and hard to get experience with no job, but with more eternal consequences); if we stray the other way we throw away all our values and basically just tell everybody that however they want to live their life is just fine.
One version is like telling sick people that the doctor won't see them until they are healthy, the other is like letting sick people in to see someone who doesn't even look at their symptoms before assuring them they'll be just fine the way they are.