The class is really fine, it's working perfectly fine but I found an issue with the single sign on process using oauth. When any user authenticates himself/herself using any provider e.g. google or facebook, they are also logged in to the provider at the same time. If you open the gmail or facebook in a new tab in the same browser, it will take you to the home page. Do you think you should provide a logout handler function which will also signout the user from the provider site i.e., if i am logged in using google and call the logout handler then it should log me out from google too.