Hi,
Thanks go to Jay on this one.
Please let us know if you have any more questions on the subject.
For your information, there is another option that you may want to look into. When you are registering your forms inside Visual Studio, you may or may not have noticed that you can set the authentication on a per-form basis to any of three possible values: Default, Custom and None.
Setting it to None allows you to have some forms of your Visual WebGui application as non-Authenticating, meaning that you can allow the users to access those forms without the requirement to login first. On such form you could add your Login button that would show a dialog and then redirect to an authenticating form, which would show directly, unless someone is trying to get in without authenticating first. In that case, you would get the standard dialog.
In my opinion, this would give you the best of both worlds. You can have your Button + Dialog implementation, but still secure your sensitive forms in your application behind the standard Visual WebGui authentication mechanism, resting assured that noone gets in unless he authenticates first.
Palli