Session management and middleware for proteus web applications.