Extract afterLogin into a separate class