implemented basic authentication