Cannot set headers after they are sent to the client I\'m getting this error. I did some study and I think it\'s because of more than one callbacks but I\'m unable to solve