Hi,
Here is one solution, this might help you.
In Master Page Load event check if session["username"] = "" or session["username"] = null.
If so, redirect to Login Page.
if (session["username"] = "" || session["username"] = null)
{
Response.Redirect("~\Login.aspx")
}
Note: You should not use the same Master Page for Login.aspx page.