Added mongoDB support and changed signup logic to use it.