Changed Spring Security configuration so that the JSESSIONID is not encoded on the url when redirecting to the login page.