Bug fix for not updating the header when autoRedirect = false

PR fixed from #16 Thanks @kazuyukitanimura!