bug fix: couldn't authenticate twice.