Logging mode and logging out over serial

The interaction isn't perfect but it's servicable.