You probably simply need to add quotes around the variables.
wget -u "$USER" -p "$PASSWORD"
If you happen to capture a newline at the end of the variable, you may want to strip it with:
wget -u "${USER%$'\n'}" -p "${PASSWORD%$'\n'}"
The ${var} syntax is equivalent to $var but curly braces allows to manipulate variables with bash. By adding %$'\n' before the ending curly brace, the % means to remove the text $'\n', which means removing the trailing newline, if any.
In the worst case scenario, you may get newline and carriage returns (probably if the files were generated by a text editor in Windows), but you can also deal with it:
wget -u "${USER%%[$'\n'$'\r']*}" -p "${PASSWORD%%[$'\n'$'\r']*}"
This time around, the searched text is [$'\n'$'\r']* which is means "the first newline (\n) or carriage return (\r) and everything after" and the %% operator means "remove the longest sequence at the end".
USER-- it's prepopulated by the shell with the current user's username, and changing it may confuse anything that expects it to have that value. There are a bunch of all-caps variables with special meanings, so it's best to use lower- or mixed-case names for your variables, to avoid possible conflicts., for example, or with even less work through theps` command). With curl, you can create a less insecure command-line:echo user|cat "$fileA" "$fileB"|paste -sd:|curl -K- http://www.example.com.