Checking if cookie is valid before returning that they're logged in