Tighten access checks on a few backend endpoints, remove unused duplicate route definitions from main.py, and add tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>