When the Rockaway Beach branch of the Long Island Rail Road was in operation half a century ago , residents of the Rockaways glided into Manhattan on a pleasant 30-minute ride , their trains joining the main line at Whitepot Junction in Rego Park , Queens .