Added logic to handle failure of get groups call
Added WWW-Authenticate header on 401