Added comments and checked if we have JSESSIONID & JSESSIONIDSSO set in cookies.