Fixed template error when user is not authenticated