that is browser caching.. try to perform any action which interacts with the server, it won't work and will ask for a login.
But still how to prevent this from happening?