How to use PHP Sessions to simplify authentication for APIs and Single Page Applications without violation the stateless principle for RestFul webservices.