Fix bug with line endings. Refactor execution.
More elegant AuthHandler.
Added "/encode" for writing scripts.