Log info in the database

Add a table to store logs and the UI counterpart. Add an helpers to log
stuff inside the UI (result uploads and user authentication for now).
Improve logs on upload by storing the sql errors messages.

Rename DDL files