made some  chnage to work with auth class