fixed client daemon, added logging
fixed server daemon and added logging for server, too.