implemented basic authentication for secured methods