Refactor: database.py oauth.py