Refactor user middleware storage
Fix extra test
Cleanup