Change home page for Web Form

I have a web form with settings Login Required, Apply Document Permissions. It’s working good. Based upon the role am changing the home page. I added a hook in on_session_creation

on_session_creation = [

import frappe

def member_route_redirect():

    if (rolename[0]=="*******"):
        frappe.local.response["home_page"] = "/abcd/"+member[0].name

It’s doing a good job. When I connect with a username and password, I get redirected to a specific member abcd/1234 ( The default route is /app), however social login (Google) doesn’t work. User Type is System User. During social login, the method method_route_redirect() is not invoked. I also tried auth_hooks, but it didn’t work.