Koji auth

Fix authentication of Koji sessions
Looks good! The only issue I see is that this atexit hook now just logs in and out immediately.