add logging and webhandler (not finished yet)