I have tried to do the bathroom pass thing about a thousand different ways. Okay, I'm exaggerating. But some days I feel like it. No matter what there always seems to be a few who take advantage.
The best way I've figured out, is to create a pass they keep in their binder. If they would like to use the restroom, they bring me their pass and then I sign it. I give them 6 passes per 6 six weeks. They know that when they get their report card (we are on a six weeks schedule) they get a new pass.
Keep kids in the classroom by "buying" their unused passes. If they only use 4 of the passes, then at the end of the six weeks you can "buy" them from them. This way they are choosing to stay in class.
As with anything else in my classroom, when you lose it, it's gone. I do not replace bathroom passes. Especially because of the "buying" incentive we use.
Print and hole punch one for each student. Ask students to keep them in their binder. Sign each roll of toilet paper as they are used.