Adding thead and tbody, also checking if a php session is already going before starting one.