Allow terminating using SIGTERM / KeyboardInterrupt
Currently, this doesn't work because we run two threads (server thread, indefinitely listening and app thread, indefinitely waiting for card reader).
The server thread is even in the foreground (which is conceptually a bit ugly).
We should somehow:
- Move the server thread to the background as soon as the app is unlocked
- Handle SIGTERM in app thread, stop server there
Or, less elegantly: Handle SIGTERM in server thread, stop app from there