Fixed cookie clearing

Fixed cookie clearing and added simple bugzilla retry login on error
case.