Fix a bug causing proxy to crash on subsequent connections
Improve UX on authentication