refacto handling security, resource controllers + adding prefix config + delete cors config