Server: work in progress for logging to db