I resolved the issue by manually creating username and password as below but now getting some other error.
$ mongo
MongoDB shell version: 2.6.10
connecting to: test
> show dbs;
admin 0.078GB
local 0.078GB
openhab (empty)
> use openhab
switched to db openhab
> var a = { user:"openhab", pwd:"password", roles:["readWrite"]}
> db.createUser(a)
Successfully added user: { "user" : "openhab", "roles" : [ "readWrite" ] }
###$ sudo node app.js
…
…
2017-01-05T09:27:37.424Z - info: openHAB-cloud: Successfully connected to mongodb
2017-01-05T09:27:37.624Z - error: uncaughtException: undefined is not a function date=Thu Jan 05 2017 09:27:37 GMT+0000 (UTC), pid=27597, uid=0, gid=0, cwd=/home/ubuntu/openhab-cloud, execPath=/usr/local/bin/node, version=v0.10.48, argv=[node, /home/ubuntu/openhab-cloud/app.js], rss=113377280, heapTotal=95370792, heapUsed=63958880, loadavg=[0.080078125, 0.0166015625, 0.00537109375], uptime=867965.058384011, trace=[column=19, file=/home/ubuntu/openhab-cloud/node_modules/node-xmpp/lib/xmpp/stream_parser.js, function=new StreamParser, line=17, method=null, native=false, column=19, file=/home/ubuntu/openhab-cloud/node_modules/node-xmpp/lib/xmpp/connection.js, function=Connection.startParser, line=137, method=startParser, native=false, column=37, file=/home/ubuntu/openhab-cloud/node_modules/node-xmpp/lib/xmpp/session.js, function=, line=64, method=null, native=false, column=16, file=events.js, function=CleartextStream.g, line=180, method=g, native=false, column=17, file=events.js, function=CleartextStream.emit, line=92, method=emit, native=false, column=17, file=tls.js, function=, line=1452, method=null, native=false, column=17, file=events.js, function=SecurePair.emit, line=92, method=emit, native=false, column=10, file=tls.js, function=SecurePair.maybeInitFinished, line=1029, method=maybeInitFinished, native=false, column=13, file=tls.js, function=CleartextStream.read [as _read], line=521, method=read [as _read], native=false, column=10, file=_stream_readable.js, function=CleartextStream.Readable.read, line=341, method=Readable.read, native=false, column=25, file=tls.js, function=EncryptedStream.write [as _write], line=418, method=write [as _write], native=false, column=10, file=_stream_writable.js, function=doWrite, line=226, method=null, native=false, column=5, file=_stream_writable.js, function=writeOrBuffer, line=216, method=null, native=false, column=11, file=_stream_writable.js, function=EncryptedStream.Writable.write, line=183, method=Writable.write, native=false, column=24, file=_stream_readable.js, function=write, line=602, method=null, native=false, column=7, file=_stream_readable.js, function=flow, line=611, method=null, native=false, column=5, file=_stream_readable.js, function=Socket.pipeOnReadable, line=643, method=pipeOnReadable, native=false, column=17, file=events.js, function=Socket.emit, line=92, method=emit, native=false], stack=[TypeError: undefined is not a function, at new StreamParser (/home/ubuntu/openhab-cloud/node_modules/node-xmpp/lib/xmpp/stream_parser.js:17:19), at Connection.startParser (/home/ubuntu/openhab-cloud/node_modules/node-xmpp/lib/xmpp/connection.js:137:19), at CleartextStream. (/home/ubuntu/openhab-cloud/node_modules/node-xmpp/lib/xmpp/session.js:64:37), at CleartextStream.g (events.js:180:16), at CleartextStream.emit (events.js:92:17), at SecurePair. (tls.js:1452:17), at SecurePair.emit (events.js:92:17), at SecurePair.maybeInitFinished (tls.js:1029:10), at CleartextStream.read [as _read] (tls.js:521:13), at CleartextStream.Readable.read (_stream_readable.js:341:10), at EncryptedStream.write [as _write] (tls.js:418:25), at doWrite (_stream_writable.js:226:10), at writeOrBuffer (_stream_writable.js:216:5), at EncryptedStream.Writable.write (_stream_writable.js:183:11), at write (_stream_readable.js:602:24), at flow (_stream_readable.js:611:7), at Socket.pipeOnReadable (_stream_readable.js:643:5), at Socket.emit (events.js:92:17)]
2017-01-05T09:27:37.625Z - error: