[TASK] Minor api fixes.

Altered whitespace, comments and replaced "err" with "error"
in JSON responses.
[TASK] Implement /profile API handler.