optimze a new login viewer