Redirect to Twitter when signin doesn't work

For a vague reason the redirect to Twitter didn't work when I wanted to signin a user. The page stayed blank but accessed the method for redirect. When I added die() after the header('location') it worked.