Applied Necessary Middleware changes for Sidebar Implementation