I think 50 seconds to boot is rather good!
Anyway, to check if a particular program is slowing the machine when you switch on, e.g. an antivirus program or when you shut down, go to Control Panel > Classic View > Performance Information and Tools > Advanced Tools in the left pane. On this screen the problem is sometimes shown.
If not, click View Performance Details in Event Log (Event Viewer). Events in the 100 series are boot events and I believe those in the 200 series are shut down events. These can be followed by double-clicking them, then clicking Event Log Online at the bottom. Lots of information on Event Viewer click here