Added a check if session id is correct.