File upload support

Auth API changed, now it returns auth code in body->result->auth instead
of body->auth.

I'm planning to convert all application protocol to body =
{status:OK|FAIL, result:{...}}