Well, I'm a software developer who knows way more about science fiction and fantasy than I really should, and if you get me drunk I'll probably tell you all about how Sauron is an ainur and therefore didn't actually die when the One Ring was destroyed - since the ainur can't die - but he did lose all his power and henceforth existed perpetually as a powerless and intangible shadow...
Oh, he is. The Maiar are "lesser Ainur" in Tolkien's cosmology. They're "of the same order as the Valar but of less degree." "Ainur" is kind of an umbrella term, the way "angel" is in Christianity.
Melkor, now known as Morgoth after being cast out, was once a Valar, but his cruelty and evil make him the foe of all of Arda. Mairon, a Maiar of Aulë, actually started down his own path of evil as a lieutenant of Morgoth, becoming Sauron.