Various fixes

Various fixes and the following trello card:
https://trello.com/c/8tndjavA/621-do-not-listen-on-https-when-https-is-not-enabled