HTTPS causes login problems