Cookiejar - fixing login problems due to cookie jar not being flushed to disk