fixed headers already sent error on signup

fixed headers already sent error on signup