api/auth/auth: split out common errors into package-level errors