made authorization service more flexible