Does your local db connection file refer to a different db or is it named differently? You could try updating these lines of code to have the db values that you know will work:
mysql_select_db($the variable from your connection file for the db, $the variable from your connection file that is assigned to your connect function call);
The variables that are referenced on these lines should hold the proper reference. Make sure that the include for the connection file is before the include for the helper file or the authenticate user server behavior.