make login/logout more resilient

if login's were attempted with 'X-Cookie' header present, the nessus
server may response with errors.

Login now clears this header if it exists.