webserver: Clean up connect code, log more backend debugging.
webserver: Clean up connect code, log more backend debugging.

paulproteus/livegrep,wfxiang08/livegrep,lekkas/livegrep,paulproteus/livegrep,paulproteus/livegrep,paulproteus/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,lekkas/livegrep,paulproteus/livegrep,wfxiang08/livegrep,lekkas/livegrep,wfxiang08/livegrep,lekkas/livegrep,paulproteus/livegrep,lekkas/livegrep,wfxiang08/livegrep,lekkas/livegrep