Thank you Dario.
What i did is creating a new class, extending the default LiteralBasedProvider class and adding the lines (for destroying the session) in it.