[TASK] Correct DB connect
[TASK] Correct LogEntry model and some controller actions