fixed user api & user tests, #35
use duo exported global when targeting browser