Fixed bug in conflicting session ids, fixed a bug in generating cookie string

Temp close session while making request, to prevent conflicting session ids (for example if provided in cookie). Also fixed a bug, the cookie string was formatted with '&' as divider, while this should be ';'.