I thought removing the side menu for not logged in users was the idea?
The reality is: this is not a supported modification. It sounds like this is something beyond what I can help you with here in the forums. For this type of custom modification, I would suggest signing up for a premiere support appointment where we can work with you one on one.