Issue 969 audit log

I tried, but it didn't work out. For an unknown reason, the db object is updated where it is not supposed to be done, and that's why I placed it here. I was really tired, so I build it like this, but I can double check again. I was hoping to invite you to do a refactor with me on this regards ;-)