In Ubuntu, the login sound should be enabled by default, if not, go to System => Preferences => Startup Applications.
There you should find the option GNOME Login Sound. Enable it and you get a sound whenever you login.
If that doesn't work, look here.
For shutdown, this could help.