User Accounts integration done for mongo users

I was able to modularize all of the code to decouple client and server code. Feel free to critique.

Thanks.