move email back into api. add redis