More concrete authentication information

Improved the authentication documentation by:
 - adding a jQuery code example of REST API authentication
 - adding brief troubleshooting section to CORS documentation that addresses the WTF behaviour that occurs when authentication fails in the actual request