Add condition if user is nil to create qrcode scan