Most of the time, your landlord is not a friend. He's not one of your dogs, your mains, your lunch buddy or your sex toy. Those people get to come over unannounced and without knocking. If your landlord thinks he can come into your space without warning, he is wrong. Even if you and your roommates have been blatantly shady and are up to no good, your landlord still can't just pop in like that because it's illegal. 

If he happens to swing by unannounced, get up from the couch, dust the Pringles off your crotch, stand erect, and be like: "Once the lease is signed, the property becomes the sole province of the tenant unless permission is explicitly asked, hoe."

Know your rights.