code example from session for how requests are handled by routes and controllers