updating rest client with cookie auth mode and changing how auth mode can be changed