Basic application to Logoff and sleep command

So I want to replicate Windows 8's shut down procedure to reduce shut down times. Fast Boot in windows 8, Logs off the user and then saves windows to a hybernised state (S4) on the HDD/SSD 

Now I have windows 7 and while windows 8 has been considered, If I could manage this in windows 7, I can hold off buying windows 8 for now.

Also I do not have an SSD. Instead I have a RAID 0 HDD Array and so an S3 state would be better over an S4 state. Seeing as I have a Haswell system, Low power states is not an issue.

I would write a simple .bat file but as with logging out of a system, The application would close with the logout and fail to complete its task. Creating a service application I haven't got a clue how to do so.

Can anyone help out with this? It dosent have to be anything complex. Just a logout and force S3 state.