Commodore Barry, Navy hero