fixed bug when server doesn't send back any cookies