Check the new login status before showing the header, because the links there depend on our login status.
Move the get_login_status() call into the login code itself.