solution is depend on what is your requirements on those cases. for example in case of back button click in dashboard you need to reload it back to dashboard what you can do is, in the login page page_load event you can check the Session["UserName"] and if it is exist then redirect to dashboard page.
to restrict direct access to Dashboard page you can check Session["UserName"] in page_load event of Dashboard page and if it is not exist then redirect user to login page.
protected void Page_Load(object sender, EventArgs e)
{
if(Session["UserName"] ==null)
{
Response.Redirect("~/Login.aspx");
}
}