Added logging and the ability to logout after a timeout and when the arduino tells it to