use forms-based authentication, put the pages in separate directories, modify your web.config, for example<configuration>
<system.web>
<authentication mode="Forms">
<forms name="MYWEBAPP.ASPXAUTH"
loginUrl="login.aspx"
protection="All"
path="/"/>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
<location path="teachers">
<system.web>
<authorization>
<!-- Order and case are important below -->
<allow roles="Teachers"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="students">
<system.web>
<authorization>
<!-- Order and case are important below -->
<allow roles="Students"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
</configuration>see details atRole-based Security with Forms Authentication
http://www.codeproject.com/aspnet/formsroleauth.asp