Check logged in

Is there anyway to check if I am already logged in before showing the log in dialog? since it makes me show this dialog everytime

example

if (!loggedin)

{

    loginForm = New DialogLoginForm(AddressOf SetLoginResult, IntegrationId, IntegrationName, Version, ManufacturerName)

    loginForm.ShowDialog()

}

if you know the Uri to log in to you can use the following: VideoOS.Platform.SDK.Environment.IsLoggedIn(ls.Uri)

If you only expect the user to log in to one site you can check if EnvironmentManager.Instance.CurrentSite is set and the get uri from ServerId.Uri on that.