title: Access Cookie via Javascript for User Information
body: <p>I found a nice <a href="http://blog.opperator.com/post/15671431847/backbone-js-sessions-and-authentication" rel="nofollow">article</a> about client side authentication with backbone.js.</p>
  
  <p>I need to access a cookie which is generated from server side.</p>
  
  <p>This leads me to the question how do I access the play cookie where some user information is stored in? I am using the Securesocial framework which stores its information in cookies as well.</p>
  
  <p>Is there any chance to do this or are there any alternatives? I also thought about putting call to my REST api "/user" which is sending me back if the user is logged in and other information. This information is than put into a singleton in backbone so I can access this information very easily. I dont know if this is the best way and of course sending everytime a request for gaining the user information is a little bit overhead.</p>
  
  <p>Background information is: I am using backbone for leaving comments to other users. Therefore I need to know which user is currently logged in and if he has the permisssion to delete his own comments.</p>
  
  <p>The login is handled by play with the typical approach and rendering html. I am using therefore the SocialSecure Module.</p>