Handle user session data for both internal and external authentication