better structure for passing basic auth closes #66