Fix warning about headers already being sent when loggin in