Fix empty db bug, login page, date schema, etc.