Handling for unauthorized Ajax requests