You have a great documentation of Sky Drive
from Microsoft here.
You should refer to this code for user sign In.
For Logout refer here , here also, and here.
There are hardly API released without documentation. So kindly refer those first. Hope that helps.