Force HTTPS and fix sendgrid email setup

Hi Dmitry,

I've made a few small changes to fit my requirements, maybe it's of help to you too. See below.

Kind regards,
Pascal