added an authenticate method .. tests are fubar still - end blocks are messed