Merge pull request #2 from jerrykan/master

Use stream_context_create as fallback if cURL not installed
Lint
Set cookie on successful login

 - the cookie needs to be set otherwise the user will not stay logged in
   after the initial login