Added database support for app. Logs are stored in database.