title: How can I manually create a authentication cookie instead of the default method?
body: <p>Using <code>FormsAuthentication</code> we write code like this:</p>
  
  <pre><code> if (IsValidUser())
   {
        FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
        FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie); 
   }
  </code></pre>
  
  <ol>
  <li><p>How can I manually create a authentication cookie instead of writing <code>FormsAuthentication.SetAuthCookie(userName, createPersistentCookie)</code>?</p></li>
  <li><p>How can I store a redirect URL from the login page in a string variable instead of writing <code>FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie)</code>?</p></li>
  </ol>