added basic authentication check.