API endpoint to auth user in non session env

The API endpoint accepts email and password (as form encoded data),
and returns user_id and token to be used to access API.