allows the angular application to handle invalid or out-of-date session tokens
merging in fix for invalid and out-of-date tokens