Respect session mode when generating QR code (closes #23)