Use keepalive on 401.

If client requests keepalive and server allows it, reuse the socket
Merge pull request #420 from taer/1.7.x

Reuse the socket on a 401