added authorization and authentication for users