core/sysauth: Redirect to https on login page if possible, #317