Amend the security, improve error messages and add QR code generation