Changed the way session id is setted