It's a cookie setting issue. On some settings, just doing a header() call doesn't set the cookie so it doesn't log you in, so it needs to give an actual page with the meta redirect for the cookie to be set.