There are many wrong things in the code. Most of your problems are related to completely forgetting what space the various vectors are in. You cannot meaningfully perform calculations between vectors located in different spaces.
normal = normalize(transpose(inverse(MV)) * vec4(normal,1)).xyz;
Using 1 as the fourth component of the normal, you completely break this calculation. This causes the normal to be translated, which is not suitable.
In addition, your normal value is calculated based on gl_Position . And gl_Position is in clip space, not model space. Thus, all you get is a normal space for clips, which is not what you need, need or can even use.
If you want to calculate the normal camera space, then calculate it from the camera position. Or calculate the normal of the model space from the positions of the model space and use the model / view matrix to convert it to camera space.
In addition, invert / transpose the CPU and transfer it to the shader. Oh, and get all the normal calculations out of the loop; you need to do this only once per triangle (save it in a local variable and copy it to the output for each vertex). And stop doing cross-product manually; use the built-in GLSL cross function.
vec3 nlightDir = normalize(vec4(lightDir,1)).xyz;
This makes no sense than using 1 as the fourth component in your conversion before. Just normalize lightDir directly.
It is equally important if you are lighting in the space of the camera, then the direction of the light must be changed with the camera so that it remains in the same visible direction in the world. Thus, you will need to take its place in world space and convert it into camera space (usually on a processor transferred as a whole).
source share