Hi Jorge,
See the KB with this query here or this one here. It will take you to a few references, videos and articles on how to create Logon Form, which hasn't changed much in version 6.4, except there have been some additions.
The global variable that indicates you are authenticated is built into the Visual WebGui framework. In pre 6.4 there was only a session level VWGContext.Current.Session.IsLoggedOn which you set to true on successful login and then your whole session is logged in. In version 6.4 there was a per form authentication added, and you will see a sample of its use here.
When you set up authentication (or logon form) in your Visual WebGui application, every time there is a request posted towards your application, Visual WebGui checks if that request is authenticated or not. If it is not, you will get the logon form automatically shown and on successful login you will be passed through to your mainform.
In your logon form, as soon as you programmatically set IsLoggedOn = true, the next request that hits your application will not go to the logon form, it will go directly to your mainform. This means that if you have a Login button, then in the Click event handler you just set IsLoggedOn = true and they you're done.
Hope this helps, but if you have any more questions, then feel free to ask.
Palli