http: fix connection close handling on auth