added fail and success handler as callback function for signIn