refactored session preset in magento application implementation