Fixed problems with network protocol.
Added logger with several log levels and log to file, html file or
screen.
Added logger to sockettest.py.