We have some sliding doors in our house, called "pocket doors" by the builders, I believe, and they have a locking mechanism. You might be able to adapt one of them to your sliding bathroom door.
"The further a society drifts from the truth, the more it will hate those that speak it." George Orwell
'08 34' SO, '12 Ram 2500 4X4, Big 6 cylinder sludge burner.