Fixed login on close