added authorization and authentication