improved log handling, added security layer, added configuration mechanism