The onbeforeunload method does not let you edit what buttons will display. It doesn't even allow you to get rid of the default text, but you can add some text to it. What I recommend you do is just let the user know that there is unsaved data and if the user continues then it will be lost.
Another option is anchoring. Anchoring is when you add a function to objects that are in your page, so this option won't work if they hit the back button, go to a new URL, or close the window. But, let's say they hit log-out or a different button that you own, you can create a custom pop-up that does exactly what you're asking.