Also note that using the ob_ functions doesn't fix the problem - it simply ignores it at the cost of unnecessary memory/CPU usage on your server.
What you really need to do is figure out what's outputting data on line 16 of login.php (the error message tells you where to look). If you want to send a header on line 38, you can't output data before then.