Thankfully the pilot comes out of the bathroom. But when he tries to open the cockpit door, it is locked. He locked himself out of the cockpit. He starts banging the cockpit door trying to open it, then asks for a fire extinguisher to see if he can use it to break the door.
That has happened several times, some with happy endings, some not.