Use the following engine calls to login and logout-
Engine.CallFrontEndCallbackEx("LoginLogout", argList)
where argList is a propertyObject that is a Container that has two subproperties - logout (bool) and isInitialLogin.
Hope this helps!
Allen P.
NI