XenForo_Application::getSession() No entry is registered for key 'session'

Hello guys,

I am using SSO for the site which auto register and login the users if they visits the site its working perfectly but i am getting a lot of these errors in the server logs.

$visitor = XenForo_Visitor::setup($user['user_id']);
XenForo_Application::getSession()->userLogin($user['user_id'], $visitor['password_date']);

Over this line ... any help would be appreciated