The cross-entropy loss should be computed on the softmax, not on the decision function. Effectively, an MLP is logistic regression with a hidden layer, so check any reference for LR (e.g. Bishop, p. 209, if you have a copy of that).