Add OAuth failure reporting. PEP-8. Use docstrings.