added cache and log dir
reworked on app structure
added security services