Remove dead code
Remove session cookie on logout
Fix middlewares