Changes to make the https work with our server

and some minor changes.