user and pass are required
expanded params and improved error checking for http response