some bug fixes, still trying to figure out authentication problem