Hi JustinWong,
One suggestion to achieve this behaviour is setting a HiddenField value (from code) based on whether user has logged in or not and canceling the '
OnClientContextMenuShowing' event after checking the HiddenField value in order to prevent the menu to appear.
Here is the example:
Regards,
Shinu.