fixing template error that was causing internal server error when doing auth