Modeling population dynamics of online communities