Updated ajax call to report error code and updated htaccess sample to account for favicon.ico, which could cause issues with sessions.