added basic authentication and permissions