added basic authentication functionality