Implement signup

Implemented user signup as well as some refactoring of the server side code into models and controllers.

Also added server validation so that required fields are required by mongo and usernames must be unique