When rendering graph, check if user is logged in. If not, redirect to index.html