fix message displayed with QR code and make sure JQuery is only included when necessary