Registration form, mongodb connection

Added the registration form, improved routing modularisation, added
connection to mongodb database.