Only accept tags (cards) when expected.

This solves the problem of applying a card before scanning, removing the card, scanning a QR code and receiving an error because the app thinks a card is present.
Add additional state (connecting to server).
Fix orientation to portrait.