Many recent works focus on introducing end-to-end neural network approaches to address the speaker diarization task. Unlike traditional systems based on a cumbersome multi-stage framework, these recent end-to-end approaches combine all stages to train a single system. However, in this kind of system, diarization information is obtained from the audio as if the system were a black box, where no meaningful internal representations of the speaker are generated. Therefore, this paper presents a new approach to train end-to-end neural diarization systems by introducing an additional loss at different levels based on speaker classification. This approach improves the overall performance compared to the original end-to-end neural diarization system without speaker loss on the DIHARD-III dataset. To achieve this performance, we employ the inference process used in other similar works in the literature which consists of using the end-to-end output as segmentation, extracting external speaker embeddings, and applying clustering. Nevertheless, we also show that the internal representations generated by this new approach can be used directly as speaker embeddings for clustering, achieving promising results.