Properly handle internal build errors.
Implemented password authentication setup. Closes #1241.