Jesus commended the Church of Ephesus for discerning and hating the teachings of the Nicolaitans.
The Nicolaitans were connected to Nicolus who was one of seven men selected to serve the early church but started teaching heresy.
Their doctrine was of Balaam who promoted sexual immorality.