MongoError: auth failed

I am trying to connect to mongodb from my web application using Mongooose. However, I get an MongoError: auth failed from mongo when I specify the database I want to connect to. If I do not specify the db, then to connection is successful.

It works when using mongo command line and mongodb management tool like Robomongo. Here is what we normally do.