Enable authenticated API access; fix some syntax errors.