[ADD] Implement state of buttons
[ADD] Close session on error
[ADD] Callback interface for server errors. Console output of the errors.
[FIX] small test changes