Fixed nasty promise bug.
Added schema for API doc responses.
Added documentation and tests for user registration.