To get the predictions you could either directly threshold the logits or apply sigmoid on them and then use a threshold in [0, 1]. E.g. a threshold of 0.0 applied on the logits would correspond to 0.5 after applying the sigmoid.
Predictions are usually not wanted in loss functions, as the threshold op or argmax are not differentiable.