On login form, after creating the login with the wizard create an event as follows:
Event level : page level
Event type : server
Event on : Before Initialize
Event Action : Logout