db connection and data retrieving

fixed http requests php db connection and full user authentication