Change ApplicationException to AuthenticationException which doesn't exist in SL5