added parameter to determine whether to encode the session id or not and an explanation on when it should/should not be used.
added parameter to determine whether to encode the session id or not and an explanation on when it should/should not be used.