Revelation 20:4-5

20:4 Then I saw thrones and seated on them were those who had been given authority to judge. I also saw the souls of those who had been beheaded because of the testimony about Jesus and because of the word of God. These had not worshiped the beast or his image and had refused to receive his mark on their forehead or hand. They came to life and reigned with Christ for a thousand years. 20:5 (The rest of the dead did not come to life until the thousand years were finished.) This is the first resurrection.

Revelation 20:12

20:12 And I saw the dead, the great and the small, standing before the throne. Then books were opened, and another book was opened – the book of life. So the dead were judged by what was written in the books, according to their deeds.

Revelation 20:15

20:15 If anyone’s name was not found written in the book of life, that person was thrown into the lake of fire.