log actions to db