fixing bug when cookie auth is optional