<font face="Verdana, Arial, Helvetica, sans-serif" size="2">It IS against current TSA requirements for the Pilots (or anyone else) to use the code to enter the flight deck except in emergencies. The Pilot that did this on your flight should be reported and held responsible.
That is not true. Please don't say a pilot should be reported for what he did. That is misleading and unfair. While I would not go into flight deck security procedures, even if you knew the code you not get in. There are other procedures as well.
As for the lav, I had a guy on once who was going to boot camp. He had way too much to drink on the flight (he brought his own, no fault of ours) and passed out in the bathroom. He was wedged in there pretty good so we had to take the lav door off to get him out. They are designed to come off of their hinges easily.