Set Cookie before redirection bug fixed