added authorization and new data directory creation