Move module.exports higher in file

Having module.exports at the end of the file interferes with the instantiation of the router
Fix paramater and global errors in user controller
Change export value of Sentinal