JARVIS-412 more work on auth middle-ware