Sessions management code added