Ok, the bad news is, there is no way to share credentials between two browser tabs that are connected to two distinct applications. There is also no way to authenticate to the REST services using just a user name and password, as that would be very insecure too.
The SharePoint credentials go back and forth from browser to server in a cookie. And browsers enforce isolation between different web sites via what's called the Same Origin Policy. The origin is the protocol, port and server name, so for instance
http://a.sharepoint.com/pages/b.aspx share the same origin of
http://a.sharepoint.com. But if there is any variation in the origin, those tabs/instances will not be able to share data like cookies, and as a result your second tab with your external app is not logged into SharePoint.
There are a couple of ways to try to work around this, both of which are pretty advanced topics that can't be fully addressed in a forum like stack exchange.
The first is that you can load SharePoint in an iframe in your external application and use window.postMessage to pass REST requests from your external application to SharePoint and pass responses back the same way (i.e. with window.postMessage). I wrote a few blog posts about this a year or so ago, that took about 6000 words with pictures and lots of source code, which is why I say it cannot be fully addressed here.
The second is that you can register your external app to get a client ID and secret and use OAuth to pass these as credentials to the REST service. There is a pretty good introductory blog post on this topic titled Performing OAuth and Rest calls with SharePoint Online (Without creating an add-in), with lots of good links to other resources on the topic.