A few years before Facebook was a publicly traded giant closing in on a billion users worldwide, it was a small 50-employee company that had just moved out of founder Mark Zuckerberg's Harvard University dorm room and into a tiny office in downtown Palo Alto, Calif. In a new memoir The Boy Kings: A Journey Into the Heart of the Social Network, Katherine Losse, an early employee at Facebook, recounts how the 2005 office had a distinctly collegiate tone akin to a frat house, complete with questionable security practices, alleged cases of sexual harassment, and more. This week The Wall Street Journal published an excerpt from Losse's book. Here, five revelations from the eyes of one of Facebook's first female employees:

1. There was a "skeleton key" password
Losse claims that there was a "skeleton key" that any Facebook employee could use to log into any user's account to access all their messages and data. "You can't write it down," another employee told Losse on her first day. The password had to be memorized. "I briefly experienced stunned disbelief," says Losse. "They just hand over the password with no background check to make sure that I am not a crazed stalker?" The master password allegedly no longer exists, and the company eventually implemented more secure measures to access accounts. 

2. New female employees were tested
The walls of the tiny office were adorned with graffiti featuring "hyper-sexualized, cartoonish women you might find in a game or comic book," says Doug Barry at Jezebel, and Facebook's male employees used these to test if women were "good sports" on their first days. "It seemed juvenile," says Losse, with the message being: "If you couldn't handle the graffiti, or the unrepentantly boyish company culture... the job wasn't going to work out."

3. Drunken revelry ended up in a photo album
In winter of 2006, Zuckerberg treated the company's employees to a stay at a vacation house in Tahoe. Toward the end of one drunken night, Losse draped a bearskin rug over her shoulders. Zuckerberg thought it was "hilarious," and insisted she wear it all night while people took photos. "It was all innocent fun; everyone was laughing and enjoying themselves." That is, at least until the questionable party pics appeared in another employee's Facebook album on Monday morning. "I was struck by the loaded nature of the image," says Losse. The picture suggested that Facebook's women had to "submit" to male employees, says Barry, and "seemed to sum up Facebook's early inability to outgrow its sexist, juvenile default setting."

4. Female employees were regularly mistreated
Losse recounts several instances in which female employees were singled out for sexual harassment and excessively harsh treatment from their managers: One senior manager was known to proposition female employees for threesomes, and Losse herself had an issue with a male engineer who behaved "dismissively or aggressively" toward female product managers. When Losse was told by a male director to talk to the guy herself, "the engineer somehow twisted things around and called me a bad feminist." Sounds like life at Facebook headquarters was more "like The Social Network than one might expect," says Andre Tartar at New York.

5. Sheryl Sandberg changed everything
It wasn't until newly minted board member and chief operating officer Sheryl Sandberg was hired in 2008 that Facebook's juvenile culture finally began to dissipate. When Sandberg took over, Losse detailed to her what had happened in the earlier incidents. A few months later, Sandberg stopped by Losse's desk, and in "the low succinct voice she mastered, said, 'I just want you to know that the situations you told me about have both been handled.'" The manager who propositioned employees had been subtly demoted, and the aggressive engineer moved to another team. "Moral of the story," says Jezebel's Barry: "Sheryl Sandberg is totally a ninja."