added ensure authenticated