Set g.login_required = True on protected pages