changed the math so that the images only appear and reappear after the sign in divs