controller test sessions#create: already signed in
create RegistrationsController test
prepare the fake user in registration test
controller test registrations#create: fail to register
controller test registrations#create: successfully registered
customise user model error messages
create 2 error code helper in application controller
follow api doc to format registrations#create
change the error code ALREADY_SIGNED_IN to AUTH_ERROR
skip verify_authenticity_token in BaseApiController
remove sessions#new
follow api doc to format application#login_required helper
comment on AUH_ERROR
create a  token_auth_required! helper: authenticate_user_from_token! + login_required
modify the 500 error response json
rename BaseApiController to BaseDeviseController
move auth helpers from ApplicationController to auth module
follow the good pattern in sessions controller respect
follow the good pattern in registration controller respect
test auth module in a mockcontroller