Ok so the model is working fine now with high accuracy as much as 96% with further improvement if trained for more epochs and very low loss too as low as 0.15. This is achieved by following steps:
layers.GlobalAveragePooling2D(), layers.Dense(1024, activation='relu'), layers.Dropout(0.5), layers.Dense(len(class_labels), activation='softmax')
By following these steps although model started with low accuracy in initial epochs it gradually reached satisfactory accuracy and this time the loss was also low from the start approx. 1 as compared to 100(absurdly high) previously.