A seaside public toilet block has been closed to the public after serious structural issues were identified at the site.