Yes, this is what I did: with respect to your example the expected accuracy is 0.5 and the accuracy in each batch is 0.5. Summing over the accuracy computed in each batch and dividing by the number of batches we would get (0.5+0.5)/2 = 0.5. Is this different from what you would expect?
Regarding the loss function, is it correct that you suggested that there is something wrong with respect to the computation of the logits?