Added https server and some error checking.

Working towards secure browsing on certain parts of the site.