Add a filter to check if the user is logged in.