Spin-valve devices based on graphene nanoribbons