CrossEntropyLoss applies LogSoftmax to the output before passing it to NLLLoss.
This snippet shows how to get equal results:
nll_loss = nn.NLLLoss()
log_softmax = nn.LogSoftmax(dim=1)
print(nll_loss(log_softmax(output), label))

cross_entropy_loss = nn.CrossEntropyLoss()
print(cross_entropy_loss(output, label))