BRAF-956: Fixed ssl redirect to include query string.