Refactor controllers to revealing module pattern
Add register user endpoint