Mac constantly returning to login screen when watching fullscreen videos.
In the past few days, my MacBook Air (13-inch, Early 2015) running macOS Sierra version 10.12.6 has shut down four times while watching fullscreen video. It doesn't actually fully shut down; instead, it returns to the login screen which shows up after restarting the computer (IE not the sleep lock screen one). I believe it is restarting itself but this happens almost quite quickly. A quick flash of black screen and then the login screen appears. I tried disabling the hardware acceleration option in chrome which fixed a similar problem with my old laptop but that did not work this time. I have inserted an image of the console logs around the time of failure which are marked with the red icon. This seems to only happen when watching videos on a certain website, namely https://animeheaven.ru/. For example, this does not occur for twitch or youtube.
Thanks for any help.
UPDATE:
I have been checking the console again and the errors listed below seem to show up quite often but do not result in a restart. Some of these are the same as the ones in the original post so there seems to be some constant failing which triggers a restart when other conditions are met.
MacBook Air 13", macOS 10.12