unit tests, and error handling on user timeout