changed read to afterLogin