I fly a lot and usually in first class. I assure you this would have been suicide all right. Once he tried to get near the cockpit the 1st class passengers would have pounded him to death.
Even after all these years, people are pretty wary.
But FWWIW, all commercial planes have locking doors and they block the entry when the flgith crew need to use the restroom.