I want to add extra feature due the topic discussed on the link below

I want to do exactly as the solution given, but I want to add that after user changes password he will be logged & redirected to callback page to enter the app.

I’m also using the Send Email Invitations for Application Signup.