```
var express = require('express'),
  instagram = require('instagram-node').instagram(),
  app = express();

  instagram.use({access_token: 'MY_ACCESS_TOKEN'});

instagram.use({
  client_id: 'my_client_id',
  client_secret: 'my_client_secret'  
});
app.get('/', function(req, res) {
  instagram.use({ access_token: 'MY_ACCESS_TOKEN' });
  instagram.media_popular(function(err, medias, remaining, limit) {
    if (err) {
        res.send(err.body);
    }      
    else  {
       console.log(medias);
       res.render('pages/index', { grams: medias });
    }
  });
});
app.listen(8888,function(){
  console.log("listening port 8888")
});

```

So, this is my code. When I'm hitting the <http://localhost:8888>, I'm getting the following page

[![enter image description here](https://i.stack.imgur.com/W38SJ.png)](https://i.stack.imgur.com/W38SJ.png)

1. What am I doing wrong?
2. Why am I not logged in when I get the 404 page?