created 2 function success() and error() as external callbacks for signInSuccess and signInError