logistic loss(still buggy)