don't bother making get request if optional username and password arguments are undefined