using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Security.Cryptography;
using System.Text;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (User.Identity.IsAuthenticated)
        {
            LoginStatus1.Visible = true;
            mypage.Visible = true;
        }
        else
            Login1.Visible = true;
    }

    protected void Login1_LoggedIn(object sender, EventArgs e)
    {
        if (User.IsInRole("administrators"))
            Response.Redirect("~/admin/DefaultAdmin.aspx");
        else
            Response.Redirect("~/code/mypage.aspx");
    }

    protected void mypage_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/code/mypage.aspx");
    }
}