Compile correctly on OSX
Report an error when db_auth_user fails.
Handle errors if wgetch returns ERR

This should prevent going into an infinite loop trying to read from the
user if they go away.
Gitignore generated files.
Fix warnings produced by clang.