Fix logging in on legacy .inc pages