Error: <script> // Find the top level window for this instance of OpenEMR, set a flag indicating // session timeout has occurred, and reload the login page into it

I installed openemr 5 in a sub folder of my website. The installation went well but while logged in and working, the following error pops up:

The moment this happens, any attempt to do any activity on the package logs me out and send me back to login page. Attached is the screenshot.
How do I rectify this?