python: use PDU_PASS environment variable, handle failed logins, and note TODOs in code