authenticate method now throws exception
refactoring