Upated code with session provider injection
Added session provider injection