Log function added with access from webservice
All events are now saved in 'events' table