Minor fixes

Fixed the session management. Now it clears the session variables each time the session user reaches the index page.