MetaMod made my day. I spent two days trying to find out the way to hide a custom html module to registered users, I tried also to write a code but I'm not a programmer so It didn't work.
I just downloaded the extension, configure it, and voila! It worked just fine.
I strongly recommend this extension