Fixes #2 and OCT #35. An email is sent when a device loses its key.