Added cookie check for token.