A new book on the founding of Twitter slated to come out next month claims St. Louis native and Twitter cofounder Jack Dorsey kicked the "real brains" behind Twitter out the door before the company became what it is today, possibly cutting his friend out of billions.

The New York Times published an adapted excerpt from the book Hatching Twitter: A True Story of Money, Power, Friendship, and Betrayal written by Nick Bilton. In it, Bilton describes the relationship between Dorsey and Noah Glass. The two met while working at Odeo, a podcasting platform that Glass cofounded with another tech entrepreneur and which hired Dorsey as an engineer. They soon became "inseparable," biking around San Francisco and drinking at concerts.

But then Odeo fell apart, mostly due to Apple getting into the podcast game. Odeo's founders needed to come up with something new. After a drunken conversation between Dorsey and Glass, according to the book, Twitter was born, and a friendship would ultimately die.

According to Bilton's account, the bones for the original idea for Twitter came from Dorsey, who envisioned a way for people to share what they're doing at any given moment, like telling people people what music they're listening to or when they're about to go to bed. But it was Glass, who was going through a divorce, who took Dorsey's idea and added a way to feel connected -- something he was desperately craving at the time. From the excerpt:

This status thing wasn't just about sharing what kind of music you were listening to or where you were, he thought. It could be a conversation. It wasn't about reporting; it was about connecting. There could be a real business in that. He would certainly like such a service: his nights alone in his apartment, alone in his office, alone in his car, could feel less alone with a steady stream of conversation percolating online.

They soon got on the project, with Dorsey on the mechanical side and Glass on the creative side, suggesting ideas now in use on Twitter, such as a stream past messages. Glass even allegedly came up with the name after going through a dictionary and deciding that "twitter," which was defined as "agitation or excitement; flutter," was the perfect word.

But as the project grew, Bilton writes, Glass' marriage issues increasingly gnawed on his mind, and he started acting irrationally with coworkers. He was also becoming paranoid, fearing that Evan Williams, the CEO of Odeo and the one putting up the money for the Twitter project, wanted him out.

Turns out that Glass was right about somebody wanting him out, but it wasn't Williams. It was his good friend Dorsey, who had already given his boss an ultimatum: Keep him and fire Glass or else he would quit.

"And for Williams, the decision was easy," Bixton writes. "Dorsey had become the lead engineer on Twitter, and Glass' personal problems were affecting his judgment."

Glass was given a small severance package and showed the door.

On the night of his forced resignation, Glass was still unaware of Dorsey's actions, and he even got drunk with him to drown his sorrows. Soon after Glass left the company, Dorsey became the chief executive and future face of one of the most successful Internet companies in the world.

To not be included in the story was hard to swallow at first, but when I realized what was happening to the product, this thing I helped create, the thing's not about me. The thing's about itself. Twitter is a phenomenon and a massively beneficial tool and it's incredibly useful and it helps a lot of people. I realized the story's not about me.

But now that Dorsey's $1.3 billion net worth is about to rise with Twitter going public at a value of about $20 billion, we wonder if Glass still feels the same way.