auth: handling with error return byt newToken.
etc: added a value for hash-cost in sample configs.
cmd: fixed the jsonWriter.

using a buffer to get the response data.

Related to #374.