Always run in debug
Clean up code
Handle browser auth window timeouts
Revert "Always run in debug"

This reverts commit 97a12b9255f7e7d2c2578a31a5c2a11540a3b320.