Register controller now inserts in mongodb