Spin injection: theory and application to Johnson's spin switch