add fclose to shadow login