I have done this in my web.config.
<system.web>
<sessionState mode="InProc" timeout="3"></sessionState>
<authentication mode="Forms" >
<forms loginUrl="~/Account/Login" timeout="2880"/>
</authentication>
After session timeout it clears all the data, but it is not redirected to the login page.