U-duality, attractors and Bekenstein-Hawking entropy in four and five dimensional supergravities