Millwall clung on to beat a poor Middlesbrough side 2-1 at The Riverside, where the hosts had a late goal ruled out.