In the Gospel of St. John we have this introduction to the passage that is known as Peter's Denial of Jesus - "Simon Peter and another disciple were following Jesus. Because this disciple was known to the high priest, he went with Jesus into the high priest's courtyard, but Peter had to wait outside at the door. The other disciple, who was known to the high priest, came back, spoke to the girl on duty there and brought Peter in." (John 18:15-16)
In his gospel John has an interesting way of describing himself. He does not want to say "I was there" when these things are happening. His signature is ‘the other disciple'. This is what I call the diplomatic identification because whenever other disciples are doing something, he refers to them by name.
At the Last Supper, we find this insertion, after Jesus reveals that one of the disciples will betray him. "His disciples stared at one another, at a loss to know which one of them he meant. One of them, the disciple that Jesus loved, was reclining next to him. Simon Peter motioned to this disciple and said ‘Ask him which one he means.' Leaning back against Jesus, he asked, ‘Lord who is it?' Jesus answered, ‘It is the one I will give this piece of bread when I have dipped it in the dish.' Then dipping the piece of bread, he gave it to Judas Iscariot the son of Simon." John 13:22-26) It is interesting that Peter and Judas are mentioned by name, but the other disciple is not.
The next event that we find this disciple is at the foot of the cross. Again the text is clear. "Near the cross of Jesus stood his mother, his mother's sister, Mary, the wife of Clopas, and Mary Magdalene. When Jesus saw his mother, and the disciple whom he loved standing nearby, he said to his mother, ‘Dear woman, here is your son!' and to the disciple, ‘Here is your mother.' From this time on, this disciple took her into his house." (John 19:25-27)
John reappears in the next passage after the soldier has pierced the side of Jesus. "The man who saw it has given his testimony and his testimony is true. He knows that he tells the truth, and he testifies so that you also may believe" (John 19:35)
In the Resurrection chapter of John's Gospel, John refers to himself again as the disciple that Jesus loved (20:2) when he races to the empty tomb and runs faster than Peter. However, when he gets to the tomb he does not look inside. The empty tomb is first seen by Peter. However, John started to create a belief gospel now when he writes: "Finally the other disciple, who had reached the tomb first, also went inside. He saw and believed." (John 20:8)
In the 21st chapter which is the last chapter of the gospel, John inserts twice "the other disciple, the one that Jesus loved." In the first place, he is the one that recognizes that the man waiting on the shore is the Lord Jesus. In Peter's reinstatement, he is trying to deal with the rumor that the loved disciple will not die until Jesus returns (21:7, 22-23). The penultimate verse of the gospel is, "This is the disciple who testifies to these things and who wrote them down. We know that his testimony is true."
We do not know exactly why John decided not to introduce himself. Was this because of humility or because by the time of the writing of the gospel, the "we" of the penultimate verse was the entire church who accepted his testimony. We also glean that he was well-connected with people in Jerusalem and for a Galilean fisherman to have entry into the high priest's court it means that he had business dealings with people in the Jewish leadership. Yet with all of these connections, he treasured his relationship with Jesus the most and he was known as the beloved disciple - the disciple that Jesus loved.