Socket.io authentication error

I am writing app in node.js + express + socket.io and get stuck with odd behavior. This code works without errors for Chrome client but everywhere else there is an error on authentication.

Server side:

express = require('express'),
app = module.exports = express.createServer(),
io = require('socket.io'),
connect = require('connect'),
cookie = require('cookie'),
RedisStore = require('connect-redis')(express),
Session = connect.middleware.session.Session;

app.configure(function(){
    app.use(express.cookieParser('secretTajemstvi'));
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(express.session({
        secret: 'secretTajemstvi',
        key: 'express.sid',
        store: SessionStore = new RedisStore(),
        cookie: {
            path: '/',
            //expires: false,
            maxAge: 3600000,
            httpOnly: true
        }
    }));
    app.use(app.router);
    app.use(express.static(__dirname + '/public'));
});

io.listen(app).set('authorization', function (data, accept){
    if (!data.headers.cookie)
        return accept('No cookie transmitted', false);
    data.cookie = cookie.parse(data.headers.cookie);
    data.cookie.expires = false;
    data.sessionID = data.cookie['express.sid'];
    data.sessionStore = SessionStore;
    SessionStore.get(data.sessionID, function (err, session) {
        console.log(err, session);
        if (err || !session)
            return accept('Error', false);
        data.session = new Session(data, session);
        return accept(null, true);
    });
}).sockets.on('connection', function (socket) {});

I get "undefined undefined" from console.log().

Thanks

Edit:

Interesting thing happened. It seems to work now in every browser. But still don't know where was problem.