php redirects should happen before any html is rendered