updated with better https handling and a better index.html page