made root factory optional

- made session factory optional

- made authentication and aothorization polciies optional