Added env_getpass because getpass is obsolete in POSIX
(getpass keeps creating implicit declaration messages on GNU/Linux)
so yes, replaced that with my own code (I feel so dirty!)

Also moved free username+password from api to main, the
const char should have pointed it to me in the past..