Clean up internals somewhat (tok2str etc.), improve output, avoid control characters in auth-simple output.