move Authenticator to function caller
add missing tests