title: Silverlight Forms Authentication
body: <p>I have Forms authentication in a Silverlight app working. I am checking if the Login was successful.</p>
  
  <p>How do I get the User credentials for User? Already logged in and with the UI?</p>
  
  <pre><code>       private void CheckForLogin()
      {
        Authentication.AuthenticationServiceClient proxy = new Authentication.AuthenticationServiceClient();
        proxy.IsLoggedInCompleted += new EventHandler&lt;Authentication.IsLoggedInCompletedEventArgs&gt;(proxy_IsLoggedInCompleted);
        proxy.IsLoggedInAsync();
  
      }
  
      void proxy_IsLoggedInCompleted(object sender, Authentication.IsLoggedInCompletedEventArgs e)
      {
  
        if (e.Result)
        {
          //Get the User Credentials here:
  
        }
        else
        {
  
          var loginWindow = new LoginWindow();
          loginWindow.Closed += new EventHandler(loginWindow_Closed);
          loginWindow.Show();
        }
      }
  
      void loginWindow_Closed(object sender, EventArgs e)
      {
        LoginWindow loginWindow = (LoginWindow)sender;
        bool? result = loginWindow.DialogResult;
  
        if (result.HasValue &amp;&amp; result.Value)
        {
  
          //Get the User Credentials here:
  
        }
      }
  </code></pre>
  
  <p>How should I proceed from here?</p>